<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

///////////////////////// FRONTEND ////////////////////////////
//for pages
$route[URL_SLUG]                  = 'front/page/getPage/$1';
$route['trang-chu']               = 'front/page/index';
$route['dang-nhap']               = 'front/page/login';
$route['tim-kiem']                = 'front/page/search';
$route['tim-kiem/tab']            = 'front/page/searchTab';
$route['tim-kiem/' . PAGING_SLUG] = 'front/page/search/$1';

//for product
$route[PRODUCT_SLUG]                     = 'front/product/index';
$route[PRODUCT_SLUG . '/' . PAGING_SLUG] = 'front/product/index/$1';
$route['p/' . URL_SLUG]                  = 'front/product/getProduct/$1';

//for category
$route['c/' . URL_SLUG] = 'front/category/getCategory/$1';

//for cart
$route['gio-hang']          = 'front/payment/index';
$route['cart/count']        = 'front/payment/countCartItems';
$route['cart/direct-push']  = 'front/payment/directAddToCart';
$route['cart/list-push']    = 'front/payment/addToCartFromList';
$route['cart/push']         = 'front/payment/addToCart';
$route['cart/delete-item']  = 'front/payment/deleteCartItem';
$route['cart/update-item']  = 'front/payment/updateCartItem';
$route['cart/total-result'] = 'front/payment/totalResult';
$route['cart/billing']      = 'front/payment/billing';
$route['cart/shopper-info'] = 'front/payment/shoppperInfo';

$route[CONTACT_ADVERTISE_SLUG]          = 'front/advertise/index';
$route[CONTACT_ADVERTISE_SLUG . '/gui'] = 'front/advertise/submitAdvert';

$route[SHOP_SLUG_NEW]                                        = 'front/eshop/index';
$route[SHOP_SLUG_NEW . '/' . PAGING_SLUG]                    = 'front/eshop/index/$1';
$route[SHOP_SLUG_NEW . '/c/' . URL_SLUG]                     = 'front/eshop/getShopByCategory/$1';
$route[SHOP_SLUG_NEW . '/c/' . URL_SLUG . '/' . PAGING_SLUG] = 'front/eshop/getShopByCategory/$1/$2';
$route[SHOP_SLUG_NEW . '/count']                             = 'front/eshop/countShopForCategory';

$route[RAOVAT_SLUG]                                        = 'front/raovat/index';
$route[RAOVAT_SLUG . '/' . PAGING_SLUG]                    = 'front/raovat/index/$1';
$route[RAOVAT_SLUG . '/' . URL_SLUG]                       = 'front/raovat/get/$1';
$route[RAOVAT_SLUG . '/c/' . URL_SLUG]                     = 'front/raovat/getByCategory/$1';
$route[RAOVAT_SLUG . '/c/' . URL_SLUG . '/' . PAGING_SLUG] = 'front/raovat/getByCategory/$1/$2';
$route[RAOVAT_SLUG . '/count']                             = 'front/raovat/countStickyByCategory';

$route[SALE_SLUG]                     = 'front/sale/index';
$route[SALE_SLUG . '/' . PAGING_SLUG] = 'front/sale/index/$1';

$route[POST_SLUG]                                        = 'front/post/index';
$route[POST_SLUG . '/' . PAGING_SLUG]                    = 'front/post/index/$1';
$route[POST_SLUG . '/' . URL_SLUG]                       = 'front/post/get/$1';
$route[POST_SLUG . '/c/' . URL_SLUG]                     = 'front/post/getByCategory/$1';
$route[POST_SLUG . '/c/' . URL_SLUG . '/' . PAGING_SLUG] = 'front/post/getByCategory/$1/$2';

$route[CONTACT_SLUG]          = "front/contact/index";
$route[CONTACT_SLUG . '/gui'] = "front/contact/send";
///////////////////////////////////////////////////////////////